<admintpl file="header" />
<style type="text/css">
    .radio {
        margin-top: 5px;
        margin-left: 15px;
        float: left;
    }
.pic-list li {
	margin-bottom: 5px;
}

input[type="checkbox"]{ margin: 0;}
    ul, ol {
        list-style: none outside none;
    }

    em.zt {
        font-size: 0;
        line-height: 0;
        width: 0;
        height: 0;
        display: inline-block;
        padding: 0;
        border: 4px solid;
        border-color: #333 transparent transparent transparent;
    / border-style: solid dashed dashed dashed;

    }

    .ks-stdmod-body label {
        display: inline-block;
    }
</style>
<link rel="stylesheet" href="__TMPL__Public/assets/css/transport.css"/>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">

            <li><a href="{:U('Playbill/index')}">节目单管理</a></li>
            <li><a href="{:U('Playbill/add')}">添加节目单</a></li>
            <li><a href="{:U('Playbill/customize')}">自选下发</a></li>
            <li class="active"><a>修改节目单</a></li>
		</ul>
		<form action="{:U('Playbill/material')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
			<div class="row-fluid">
				<div class="span6">
					<table class="table table-bordered">
						<tr>
							<th>标题</th>
							<td>
                        		<input type="hidden"  name="source" value="edit"/>
                        		<input type="hidden"  name="id" value="{$game.id}"/>
								<input type="text" name="name"  value="{$game.name}" placeholder="请输入标题"/>
							</td>
						</tr>
						<tr>
							<th>类型</th>
							<td>
                            <label class="radio">
                                <input type="radio" name="ptype" class="switch_card_type" value="1"<if condition="$game['ptype'] eq 1" >checked</if>  disabled>
                                <span>普通节目单</span>
                            </label>
                            <label class="radio">
                                <input type="radio" name="ptype" class="switch_card_type" value="2"<if condition="$game['ptype'] eq 2" >checked</if>  disabled>
                                <span>全国节目单</span>
                            </label>
							</td>
						</tr>
						<tr>
							<th>屏幕模板</th>
							<td>
								<input type="hidden" name="template"  value="{$game.template_id},{$game.template_name},{$game.template_preview}" />
								<input type="text" readonly="readonly"  value="{$game.template_name}" />
							</td>
						</tr>
						<tr>
							<th>开始日期</th>
							<td><input type="text" name="start_at" value="{$game.start_at}" class="js-datetime"></td>
						</tr>
						<tr>
							<th>结束日期</th>
							<td><input type="text" name="end_at" value="{$game.end_at}" class="js-datetime"></td>
						</tr>
                        <tr data-group="n1">
                            <th>选择区域</th>
                            <td class="cell-area">
                            <a class="acc_popup edit J_EditArea" title="编辑运送区域" area-haspopup="true"
                               area-controls="J_DialogArea" entype="J_EditArea" data-acc="event:enter"
                               href="JavaScript:void(0);">地域投放</a>
                                <span class="area-group">
                                    <input class="J_BatchField" style="width:15px;display:none" type="checkbox" name="es_n1">
                                    <p>{:implode(',',$areanames)}</p>
                                </span>
                                 <input type="hidden" value="{$areacode}" name="areas[]">

                            </td>
                        </tr>
						<tr>
							<th>描述</th>
							<td>
								<input type="text" name="introduction"  value="{$game.introduction}" placeholder="请填写描述"/>
							</td>
						</tr>
					</table>
				</div>
    		<div class="span6">
				<table width="100%"  class="table table-bordered">
						<td style="text-align: center;">
	                    	<img id="mbimg" src="{$game.template_preview}"/>
						</td>
				</table>
			</div>
			</div>
			<div class="form-actions">
				<button class="btn btn-primary js-ajax-submit" type="submit">下一步</button>
				<a class="btn" href="{:U('Playbill/index')}">返回</a>
			</div>
		</form>
	</div>
	<!-- Dialog -->
<div id="dialog_areas" class="dialog-areas" style="display:none">
    <div class="ks-contentbox">
        <div class="ks-stdmod-header">
            <div class="title">选择区域</div>
        </div>
        <div class="ks-stdmod-body">
            <form method="post" style="margin: 0;">
                <ul id="J_CityList" style="margin: 0;">
                    <!-- BEGIN CITY LIST ----->
                    <li>
                        <div class=" dcity clearfix">
                                <div class="ecity gcity">
                                <span class="group-label">
                                <input type="checkbox" id="J_Group_1" name="areas" class="J_Group js-check-all" value="100000" data-direction="x" data-checklist="js-check-x"/>
                                <label for="J_Group_1" class="checkbox">全国</label>
                                </span>
                                </div>
                                <div class="province-list">
                                <foreach name="province" item="vo">
                                    <div class="ecity">
                                        <span class="gareas">
                                            <input type="checkbox" name="areas" class="J_Province js-check" id="J_Province_{$vo.id}" value="{$vo.code}" data-yid="js-check-y" data-xid="js-check-x"/>
                                            <label for="J_Province_{$vo.id}">{$vo.shortname}</label>
                                            <span class="check_num"/></span>
                                            <em class="zt trigger"></em>
                                            <div class="citys">
                                                <foreach name="city" item="v">
                                                	<if condition="$vo['code'] eq $v['parent_id']" >
	                                                    <span class="areas">
	                                                    <input type="checkbox" name="areas" class="J_City" id="J_City_{$v.id}" value="{$v.code}"/>
	                                                    <label for="J_City_{$v.id}">{$v.name}</label>
	                                                    </span>
                                                	</if>
                                                </foreach>
                                                <p style="text-align: right;">
                                                    <input type="button" class="close_button" value="关闭"/>
                                                </p>
                                            </div>
                                        </span>
                                    </div>
                                </foreach>
                                <span class="group-label">
                   					<button class="J_Submit btn btn-primary" type="button">确定</button>
                                </span>
                                </div>
                        </div>
                    </li>
                    <!--END------>
                </ul>
            </form>
        </div>
        <div class="ks-stdmod-footer">
            <a class="ks-ext-close" href="javascript:void(0)">
                <span class="ks-ext-close-x">X</span>
            </a>
        </div>
    </div>
</div>
	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
    <script type="text/javascript" src="__TMPL__Public/assets/js/transport-w.js"></script>
</body>
</html>